:root {
  --org-chart-space: 20px;
  --org-chart-line-width: 1px;
  --org-chart-line-color: #ccc;
}

.super-org-chart ul li {
  list-style: none;
  position: relative;
}

.super-org-chart,
.super-org-chart li,
.super-org-chart li > div {
  display: inline-block;
  vertical-align: top;
}

.super-org-chart ul {
  margin: 0;
  padding: 0;
  font-size: 0;
  white-space: nowrap;
}

.super-org-chart ul::before {
  content: '';
  height: var(--org-chart-space);
  width: var(--org-chart-line-width);
  background-color: var(--org-chart-line-color);
  display: block;
  margin-left: calc(50% - var(--org-chart-line-width) / 2);
}

.super-org-chart > ul::before {
  display: none;
}

.super-org-chart li::before {
  content: '';
  height: var(--org-chart-line-width);
  background-color: var(--org-chart-line-color);
  display: block;
  margin-bottom: var(--org-chart-space);
}

.super-org-chart ul > li:first-child::before {
  width: 50%;
  margin-left: 50%;
}

.super-org-chart ul > li:last-child::before {
  width: 50%;
  margin-right: 50%;
}

.super-org-chart ul > li:only-child::before {
  width: 0;
}

.super-org-chart li::after {
  position: absolute;
  top: 0;
  left: calc(50% - var(--org-chart-line-width) / 2);
  content: '';
  height: calc(var(--org-chart-space) + var(--org-chart-line-width));
  width: var(--org-chart-line-width);
  background-color: var(--org-chart-line-color);
  display: block;
}

.super-org-chart > ul > li:only-child:after {
  display: none;
}

.super-org-chart li {
  text-align: center;
  font-size: 14px;
}

.super-org-chart li > div {
  border: 1px solid #ccc;
  padding: 5px 10px;
  margin: 0 10px;
}
